package com.atguigu.chaptar1

object StringTest {

  def main(args: Array[String]): Unit = {
    //通过""
    var a = "sdf";
    //通过new
    var b = new String("浮点数")
    //通过普通拼接
    var c = a + b
    //通过插值表达式
    var d = s"${a + b}"
    println(d)
    var e = s"${a + b}     123${b}"
    println(e)
    var a1 = 1.toString
    var url = "http://%s:%s/user/hive/warehouse".format("hadoop102", 9870)
    println(url)
    printf("http://%s:%s/user/hive/warehouse","hadoop",9870)
    var aaaa = "select * " +
      "from student " +
      "where name = wzx"
    var afsdfsd =
      """
        |select name,age
        |sex from student
        |join score on score.id = student.s_id
        |where name = wzx
        |""".stripMargin
    println(a)
    var dsaf :Char = 15
    println(dsaf.toInt)

    val a2 = 5
    val a3 = 6
    var a4 = a2 + a3
    a4 = a2 + (a3)
    a4 = a2.+(a3)

  }
}
